package router

import (
	"ruoyi-go-echo-ddd/internal/infrastructure/http/handler"

	"github.com/labstack/echo/v4"
)

// NewSysMenuRouter 系统菜单路由初始化
func NewSysMenuRouter(group *echo.Group, sysMenu *handler.SysMenuHandler) {
	sysMenuRouter := group.Group("/system/menu")
	sysMenuRouter.POST("", sysMenu.SaveHandler)
	sysMenuRouter.PUT("", sysMenu.UpdateHandler)
	sysMenuRouter.POST("/batchSave", sysMenu.BatchSaveHandler)
	sysMenuRouter.GET("/list", sysMenu.SelectTreeTableListHandler)
	sysMenuRouter.GET("/page", sysMenu.SelectPageHandler)
	sysMenuRouter.POST("/page", sysMenu.SelectPageHandler)
	sysMenuRouter.GET("/:id", sysMenu.SelectOneHandler)
	sysMenuRouter.DELETE("/:id", sysMenu.BatchDeleteHandler)
	sysMenuRouter.GET("/roleMenuTreeSelect/:roleId", sysMenu.RoleMenuTreeRoleIdHandler)
	sysMenuRouter.GET("/treeSelect", sysMenu.TreeSelectHandler)
}
